package com.hzw.saas.web.admin.config;

import com.hzw.saas.api.rbac.IUserRoleService;
import com.hzw.saas.api.sys.service.ISysUserService;
import com.hzw.saas.api.user.IStaffService;
import com.hzw.saas.web.admin.security.UserDetailsServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.userdetails.UserDetailsService;
import lombok.AllArgsConstructor;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/2/24 13:54
 */
@Configuration
@AllArgsConstructor
public class ManagerBeanConfig {

    private final ISysUserService sysUserService;
    private final IUserRoleService userRoleService;
    private final IStaffService staffService;

    @Bean
    public UserDetailsService userDetailsService() {
        return new UserDetailsServiceImpl(sysUserService, userRoleService, staffService);
    }

}
